{echo:JS::import('dialog?skin=brief');}
{echo:JS::import('dialogtools');}
{echo:JS::import('form');}
{echo:JS::import('date');}
<style type="text/css">
    #table_option td{
        width: 8px;
        height: 8px;
        background: #ddd;
        border:1px #999 solid;
        cursor: pointer;
    }
</style>
<h1 class="page_title">{$title}</h1>
<form action="{url:/app/guide_save}" method="post" id="appForm" enctype="multipart/form-data">
<div id="obj_form" class="form2">
<!-- 
		<dl class="lineD">
        <dt>操作系统：</dt>
        <dd>
          <label>Android</label>
        </dd>
        </dl>
		<dl class="lineD">
        <dt onclick="show()">版本 code：</dt>
        <dd>
         	<input type="text" name="version_code" value="{$obj['version_code']}" readonly/>
        </dd>
        </dl>
      	<dl class="lineD">
        <dt><b class="red">*</b> 版本号：</dt>
        <dd>
          <input type="text" id="version_no" name="version_no" value="{$obj['version_no']}" class="big" pattern="required"  alt="版本号不能为空！" >
        </dd>
        </dl>
         -->

        <dl class="lineD">
        <dt>图片：</dt>
        <dd>
        	{if:$obj['id'] == null}
        		<input type="file" name="upImg" id="upImg" class="big"/>  
        	{else:}
        		<img src="{$domain}{$obj['content']}" width="12%" height="800%"/>
        	{/if}
          	        
        </dd>
        </dl>
		<dl class="lineD">
        <dt> 顺序：</dt>
        <dd>
          <input type="text" id="order" name="order" value="{$obj['order']|'0'}" class="big" pattern="\d*"  alt="顺序不能为空且必须为数字！" >
        </dd>
        </dl>
        <dl class="lineD">
        <dt>是否显示：</dt>
        <dd>
          <select name="is_open">
          	{if: $obj['is_open'] == '0'}
          		<option value="0" selected="selected">否</option>
          		<option value="1">是</option>
          	{else:}
          		<option value="0" >否</option>
          		<option value="1" selected="selected">是</option>
          	{/if}
          </select>
        </dd>
        </dl>
        
        <!-- 
        <dl class="lineD">
        <dt>版本描述：</dt>
        <dd>
          <textarea name="introduct" >{$obj['introduct']}</textarea>
          <label></label>
        </dd>
        </dl>
         --> 
      </div>
      <input type="hidden" name="id" value="{$obj['id']}"/>
      <!--活动描述 end-->
      <div style="text-align:center"><input onclick="return check();" type="submit" value="提交" class="button">&nbsp;&nbsp;&nbsp;&nbsp;<input type="reset" value="重置" class="button"></div>
</form>
<script type="text/javascript">
function check()
{
	
	if($("#upImg").val() == "")
	{
		$(".invalid-msg").remove();
		//alert("图片不能为空");
		$("#upImg").after("<label class='invalid-msg'>图片不能为空</label>");
		return false;
	}
	else
	{
		$("#upImg").next().remove();
	}
}
$("#table_option td:eq({$contents[0]['position']})").css("background","#000");
</script>